﻿//-----------------------------------------------------------------
//
// @(#)$Id: DailyRefundParcelReport.aspx.cs,v 1.0 2013/12/16 9:49:22 lichunhua Exp $
// @(#)$Author: lichunhua  $
// @(#)$Date: 2013/12/16 9:49:22 $
// @(#)$Description:
//
//
//
//                 All Rights Reserved.
//-----------------------------------------------------------------
using System;
using System.Data;
using ebay.Dal;

public partial class UI_Report_DailyRefundParcelReport : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        WebUtility.CheckRight();
        if (!IsPostBack)
        {
            //Bind(DateTime.Now.ToString("yyyyMM"));
        }
    }

    void Bind(string QDate)
    {
        Report ag = new Report();
        this.Repeater1.DataSource = ag.GetDailyRefundParcel(QDate);
        this.Repeater1.DataBind();
    }
    protected void btnQuery_Click(object sender, EventArgs e)
    {
        string qDate = txtQDate.Value;

        Bind(qDate);        
    }
    protected void btnExport_Click(object sender, EventArgs e)
    {
        if (Session["UserId"] == null)
        {
            WebUtility.ShowMsg("登陆超时,请重新登陆", this);
            return;
        }
        string qDate = txtQDate.Value;
        Report ag = new Report();
        DataTable table = ag.GetDailyRefundParcel(qDate);
        if (table != null)
        {
            DataSetToExcel.DataSetOutExcel(table, "每月退款重发表");
        }
        else
        {
            WebUtility.ShowMsg("无数据", this);

        }
    }
}
